﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PROD_MRP_QTY
// * CreateDate    : 2011-11-21 16:54:38
// * Creater       : CodeSmith
// * LastChangeDate: 2011-11-21 16:54:38
// * LastChanger   : 2011-11-21 16:54:38
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class ProdMrpQtyEntity : EntityBase
    {
        public ProdMrpQtyTable TableSchema
        {
            get
            {
                return ProdMrpQtyTable.Current;
            }
        }

        public ProdMrpQtyEntity()
        {

        }

        public ProdMrpQtyEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.CurrentStorageQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["CURRENT_STORAGE_QTY"]));
            this.PlanPurchaseQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["PLAN_PURCHASE_QTY"]));
            this.AvailableQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["AVAILABLE_QTY"]));
            this.WareHouseCode = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_CODE"]));
        }

        public ProdMrpQtyEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.CurrentStorageQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["CURRENT_STORAGE_QTY"]));
            this.PlanPurchaseQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["PLAN_PURCHASE_QTY"]));
            this.AvailableQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["AVAILABLE_QTY"]));
            this.WareHouseCode = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_CODE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ProdMrpQtyTable.Current;
            }
        }

        #region Perporty List
        public string ProductId
        {
            get { return Convert.ToString(GetData(ProdMrpQtyTable.C_PRODUCT_ID)); }
            set { SetData(ProdMrpQtyTable.C_PRODUCT_ID, value); }
        }
        public string WareHouseCode
        {
            get { return Convert.ToString(GetData(ProdMrpQtyTable.C_WAREHOUSE_CODE)); }
            set { SetData(ProdMrpQtyTable.C_WAREHOUSE_CODE, value); }
        }
        public decimal CurrentStorageQty
        {
            get { return Convert.ToDecimal(GetData(ProdMrpQtyTable.C_CURRENT_STORAGE_QTY)); }
            set { SetData(ProdMrpQtyTable.C_CURRENT_STORAGE_QTY, value); }
        }

        public decimal PlanPurchaseQty
        {
            get { return Convert.ToDecimal(GetData(ProdMrpQtyTable.C_PLAN_PURCHASE_QTY)); }
            set { SetData(ProdMrpQtyTable.C_PLAN_PURCHASE_QTY, value); }
        }

        public decimal AvailableQty
        {
            get { return Convert.ToDecimal(GetData(ProdMrpQtyTable.C_AVAILABLE_QTY)); }
            set { SetData(ProdMrpQtyTable.C_AVAILABLE_QTY, value); }
        }

        #endregion
    }


}

